package cn.com.digitalnet.ad.entity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.springframework.format.annotation.DateTimeFormat;

import cn.com.digitalnet.ad.base.IdEntity;

@Entity
@Table(name="${tableName}")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ${className} extends IdEntity {

<#list javaProps as map>
	<#list map?keys as name>
      
      <#if map[name]?contains("date")>
      	@DateTimeFormat(pattern="yyyy-MM-dd") private ${map[name]?cap_first} ${name};
      	<#else>
		 private ${map[name]?cap_first} ${name};
      </#if>
    </#list>
 </#list>
 
  <#list javaProps as map>
    <#list map?keys as name>
   		
        public ${map[name]?cap_first} get${name?cap_first}() {
			return ${name};
		}
		
		public void set${name?cap_first}(${map[name]?cap_first} ${name}) {
			this.${name} = ${name};
		}
        
    </#list>
</#list>

	
}
